``` c
#pragma once
#include <Arduino.h>
#include <LittleFS.h>

#ifdef _DEBUG_
#define _PP(a) Serial.print(a);
#define _PL(a) Serial.println(a);
#else
#define _PP(a)
#define _PL(a)
#endif

void low(int pin) { digitalWrite(pin, LOW); }
void high(int pin) { digitalWrite(pin, HIGH); }
void toggle(int pin) { digitalWrite(pin, !digitalRead(pin)); }
void blink(int pin, int t, int n) {
  for (int i = 0; i < n; i++) {
    low(pin);
    delay(t);
    high(pin);
    delay(t);
  }
}

// 在setup或loop函数中调用此函数
// writeToFile("/example.txt", content);
void writeToFile(const char *path, const String &content) {
  File file = LittleFS.open(path, "w");
  if (!file) {
    Serial.println("Failed to open file for writing");
    return;
  }
  if (file.print(content)) {
    Serial.println("File written");
  } else {
    Serial.println("Write failed");
  }
  file.close();
}

```